Optimal. Leaf size=66 \[ -\frac {\cos ^4(a+b x)}{x}-b \text {CosIntegral}(2 b x) \sin (2 a)-\frac {1}{2} b \text {CosIntegral}(4 b x) \sin (4 a)-b \cos (2 a) \text {Si}(2 b x)-\frac {1}{2} b \cos (4 a) \text {Si}(4 b x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3394, 3384,
3380, 3383} \begin {gather*} -b \sin (2 a) \text {CosIntegral}(2 b x)-\frac {1}{2} b \sin (4 a) \text {CosIntegral}(4 b x)-b \cos (2 a) \text {Si}(2 b x)-\frac {1}{2} b \cos (4 a) \text {Si}(4 b x)-\frac {\cos ^4(a+b x)}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3380
Rule 3383
Rule 3384
Rule 3394
Rubi steps
\begin {align*} \int \frac {\cos ^4(a+b x)}{x^2} \, dx &=-\frac {\cos ^4(a+b x)}{x}+(4 b) \int \left (-\frac {\sin (2 a+2 b x)}{4 x}-\frac {\sin (4 a+4 b x)}{8 x}\right ) \, dx\\ &=-\frac {\cos ^4(a+b x)}{x}-\frac {1}{2} b \int \frac {\sin (4 a+4 b x)}{x} \, dx-b \int \frac {\sin (2 a+2 b x)}{x} \, dx\\ &=-\frac {\cos ^4(a+b x)}{x}-(b \cos (2 a)) \int \frac {\sin (2 b x)}{x} \, dx-\frac {1}{2} (b \cos (4 a)) \int \frac {\sin (4 b x)}{x} \, dx-(b \sin (2 a)) \int \frac {\cos (2 b x)}{x} \, dx-\frac {1}{2} (b \sin (4 a)) \int \frac {\cos (4 b x)}{x} \, dx\\ &=-\frac {\cos ^4(a+b x)}{x}-b \text {Ci}(2 b x) \sin (2 a)-\frac {1}{2} b \text {Ci}(4 b x) \sin (4 a)-b \cos (2 a) \text {Si}(2 b x)-\frac {1}{2} b \cos (4 a) \text {Si}(4 b x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.15, size = 79, normalized size = 1.20 \begin {gather*} -\frac {3+4 \cos (2 (a+b x))+\cos (4 (a+b x))+8 b x \text {CosIntegral}(2 b x) \sin (2 a)+4 b x \text {CosIntegral}(4 b x) \sin (4 a)+8 b x \cos (2 a) \text {Si}(2 b x)+4 b x \cos (4 a) \text {Si}(4 b x)}{8 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 90, normalized size = 1.36
method | result | size |
derivativedivides | \(b \left (-\frac {\cos \left (4 b x +4 a \right )}{8 b x}-\frac {\sinIntegral \left (4 b x \right ) \cos \left (4 a \right )}{2}-\frac {\cosineIntegral \left (4 b x \right ) \sin \left (4 a \right )}{2}-\frac {\cos \left (2 b x +2 a \right )}{2 b x}-\sinIntegral \left (2 b x \right ) \cos \left (2 a \right )-\cosineIntegral \left (2 b x \right ) \sin \left (2 a \right )-\frac {3}{8 b x}\right )\) | \(90\) |
default | \(b \left (-\frac {\cos \left (4 b x +4 a \right )}{8 b x}-\frac {\sinIntegral \left (4 b x \right ) \cos \left (4 a \right )}{2}-\frac {\cosineIntegral \left (4 b x \right ) \sin \left (4 a \right )}{2}-\frac {\cos \left (2 b x +2 a \right )}{2 b x}-\sinIntegral \left (2 b x \right ) \cos \left (2 a \right )-\cosineIntegral \left (2 b x \right ) \sin \left (2 a \right )-\frac {3}{8 b x}\right )\) | \(90\) |
risch | \(\frac {\pi \,\mathrm {csgn}\left (b x \right ) {\mathrm e}^{-2 i a} b}{2}-\sinIntegral \left (2 b x \right ) {\mathrm e}^{-2 i a} b +\frac {i \expIntegral \left (1, -2 i b x \right ) {\mathrm e}^{-2 i a} b}{2}-\frac {i b \expIntegral \left (1, -2 i b x \right ) {\mathrm e}^{2 i a}}{2}+\frac {\pi \,\mathrm {csgn}\left (b x \right ) {\mathrm e}^{-4 i a} b}{4}-\frac {\sinIntegral \left (4 b x \right ) {\mathrm e}^{-4 i a} b}{2}+\frac {i \expIntegral \left (1, -4 i b x \right ) {\mathrm e}^{-4 i a} b}{4}-\frac {i b \expIntegral \left (1, -4 i b x \right ) {\mathrm e}^{4 i a}}{4}-\frac {3}{8 x}-\frac {\cos \left (4 b x +4 a \right )}{8 x}-\frac {\cos \left (2 b x +2 a \right )}{2 x}\) | \(151\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains complex when optimal does not.
time = 0.38, size = 717, normalized size = 10.86 \begin {gather*} \frac {{\left ({\left ({\left (E_{2}\left (4 i \, b x\right ) + E_{2}\left (-4 i \, b x\right )\right )} \cos \left (2 \, a\right )^{2} + {\left (E_{2}\left (4 i \, b x\right ) + E_{2}\left (-4 i \, b x\right )\right )} \sin \left (2 \, a\right )^{2}\right )} \cos \left (4 \, a\right )^{3} + {\left ({\left (-i \, E_{2}\left (4 i \, b x\right ) + i \, E_{2}\left (-4 i \, b x\right )\right )} \cos \left (2 \, a\right )^{2} + {\left (-i \, E_{2}\left (4 i \, b x\right ) + i \, E_{2}\left (-4 i \, b x\right )\right )} \sin \left (2 \, a\right )^{2}\right )} \sin \left (4 \, a\right )^{3} + 4 \, {\left ({\left (E_{2}\left (2 i \, b x\right ) + E_{2}\left (-2 i \, b x\right )\right )} \cos \left (2 \, a\right )^{3} + {\left (-i \, E_{2}\left (2 i \, b x\right ) + i \, E_{2}\left (-2 i \, b x\right )\right )} \sin \left (2 \, a\right )^{3} + {\left ({\left (E_{2}\left (2 i \, b x\right ) + E_{2}\left (-2 i \, b x\right )\right )} \cos \left (2 \, a\right ) + 3\right )} \sin \left (2 \, a\right )^{2} + {\left (E_{2}\left (2 i \, b x\right ) + E_{2}\left (-2 i \, b x\right )\right )} \cos \left (2 \, a\right ) + 3 \, \cos \left (2 \, a\right )^{2} + {\left ({\left (-i \, E_{2}\left (2 i \, b x\right ) + i \, E_{2}\left (-2 i \, b x\right )\right )} \cos \left (2 \, a\right )^{2} - i \, E_{2}\left (2 i \, b x\right ) + i \, E_{2}\left (-2 i \, b x\right )\right )} \sin \left (2 \, a\right )\right )} \cos \left (4 \, a\right )^{2} + {\left (4 \, {\left (E_{2}\left (2 i \, b x\right ) + E_{2}\left (-2 i \, b x\right )\right )} \cos \left (2 \, a\right )^{3} + 4 \, {\left (-i \, E_{2}\left (2 i \, b x\right ) + i \, E_{2}\left (-2 i \, b x\right )\right )} \sin \left (2 \, a\right )^{3} + 4 \, {\left ({\left (E_{2}\left (2 i \, b x\right ) + E_{2}\left (-2 i \, b x\right )\right )} \cos \left (2 \, a\right ) + 3\right )} \sin \left (2 \, a\right )^{2} + {\left ({\left (E_{2}\left (4 i \, b x\right ) + E_{2}\left (-4 i \, b x\right )\right )} \cos \left (2 \, a\right )^{2} + {\left (E_{2}\left (4 i \, b x\right ) + E_{2}\left (-4 i \, b x\right )\right )} \sin \left (2 \, a\right )^{2}\right )} \cos \left (4 \, a\right ) + 4 \, {\left (E_{2}\left (2 i \, b x\right ) + E_{2}\left (-2 i \, b x\right )\right )} \cos \left (2 \, a\right ) + 12 \, \cos \left (2 \, a\right )^{2} + 4 \, {\left ({\left (-i \, E_{2}\left (2 i \, b x\right ) + i \, E_{2}\left (-2 i \, b x\right )\right )} \cos \left (2 \, a\right )^{2} - i \, E_{2}\left (2 i \, b x\right ) + i \, E_{2}\left (-2 i \, b x\right )\right )} \sin \left (2 \, a\right )\right )} \sin \left (4 \, a\right )^{2} + {\left ({\left (E_{2}\left (4 i \, b x\right ) + E_{2}\left (-4 i \, b x\right )\right )} \cos \left (2 \, a\right )^{2} + {\left (E_{2}\left (4 i \, b x\right ) + E_{2}\left (-4 i \, b x\right )\right )} \sin \left (2 \, a\right )^{2}\right )} \cos \left (4 \, a\right ) + {\left ({\left ({\left (-i \, E_{2}\left (4 i \, b x\right ) + i \, E_{2}\left (-4 i \, b x\right )\right )} \cos \left (2 \, a\right )^{2} + {\left (-i \, E_{2}\left (4 i \, b x\right ) + i \, E_{2}\left (-4 i \, b x\right )\right )} \sin \left (2 \, a\right )^{2}\right )} \cos \left (4 \, a\right )^{2} + {\left (-i \, E_{2}\left (4 i \, b x\right ) + i \, E_{2}\left (-4 i \, b x\right )\right )} \cos \left (2 \, a\right )^{2} + {\left (-i \, E_{2}\left (4 i \, b x\right ) + i \, E_{2}\left (-4 i \, b x\right )\right )} \sin \left (2 \, a\right )^{2}\right )} \sin \left (4 \, a\right )\right )} b}{32 \, {\left ({\left (a \cos \left (2 \, a\right )^{2} + a \sin \left (2 \, a\right )^{2}\right )} \cos \left (4 \, a\right )^{2} + {\left (a \cos \left (2 \, a\right )^{2} + a \sin \left (2 \, a\right )^{2}\right )} \sin \left (4 \, a\right )^{2} - {\left ({\left (\cos \left (2 \, a\right )^{2} + \sin \left (2 \, a\right )^{2}\right )} \cos \left (4 \, a\right )^{2} + {\left (\cos \left (2 \, a\right )^{2} + \sin \left (2 \, a\right )^{2}\right )} \sin \left (4 \, a\right )^{2}\right )} {\left (b x + a\right )}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 87, normalized size = 1.32 \begin {gather*} -\frac {4 \, \cos \left (b x + a\right )^{4} + 2 \, b x \cos \left (4 \, a\right ) \operatorname {Si}\left (4 \, b x\right ) + 4 \, b x \cos \left (2 \, a\right ) \operatorname {Si}\left (2 \, b x\right ) + {\left (b x \operatorname {Ci}\left (4 \, b x\right ) + b x \operatorname {Ci}\left (-4 \, b x\right )\right )} \sin \left (4 \, a\right ) + 2 \, {\left (b x \operatorname {Ci}\left (2 \, b x\right ) + b x \operatorname {Ci}\left (-2 \, b x\right )\right )} \sin \left (2 \, a\right )}{4 \, x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cos ^{4}{\left (a + b x \right )}}{x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.47, size = 3220, normalized size = 48.79 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {{\cos \left (a+b\,x\right )}^4}{x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________